# Copyright (c) 2018 Presto Labs Pte. Ltd.
# Author: xguo

from coin.exchange.base.kr_rest.order_base import OrderBase
from coin.exchange.okex_futures.kr_rest.private_client import (
    OkexFuturesPrivateClient,)
from coin.exchange.okex_futures.kr_rest.futures_product import (
    OkexFuturesProduct,)


class OkexFuturesV1Order(OrderBase):
  ProductType = OkexFuturesProduct

  def __init__(self, products, key_file):
    OrderBase.__init__(self, products, key_file)
    self.client = OkexFuturesPrivateClient(key_file)

  def query_balance_impl(self):
    return self.client.query_account_balance()

  def query_submit(self, product, side, price, qty):
    raise NotImplementedError()

  def query_cancel(self, product, order_id):
    raise NotImplementedError()

  def query_cancel_product(self, product):
    raise NotImplementedError()

  def query_list_orders(self, product):
    return self.client.query_list_orders(product)
